package com.wuye.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Fangchan entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "fangchan", catalog = "test")
public class Fangchan implements java.io.Serializable {

	// Fields

	private Integer id;
	private Users users;
	private String lou;
	private String danyuan;
	private String fanghao;
	private Date shijian;

	// Constructors

	/** default constructor */
	public Fangchan() {
	}

	/** full constructor */
	public Fangchan(Users users, String lou, String danyuan, String fanghao,
			Date shijian) {
		this.users = users;
		this.lou = lou;
		this.danyuan = danyuan;
		this.fanghao = fanghao;
		this.shijian = shijian;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "usersid")
	public Users getUsers() {
		return this.users;
	}

	public void setUsers(Users users) {
		this.users = users;
	}

	@Column(name = "lou")
	public String getLou() {
		return this.lou;
	}

	public void setLou(String lou) {
		this.lou = lou;
	}

	@Column(name = "danyuan")
	public String getDanyuan() {
		return this.danyuan;
	}

	public void setDanyuan(String danyuan) {
		this.danyuan = danyuan;
	}

	@Column(name = "fanghao")
	public String getFanghao() {
		return this.fanghao;
	}

	public void setFanghao(String fanghao) {
		this.fanghao = fanghao;
	}

	@Column(name = "shijian", length = 0)
	public Date getShijian() {
		return this.shijian;
	}

	public void setShijian(Date shijian) {
		this.shijian = shijian;
	}

}